Skip to content

[PM-34724] Access Intelligence Carousel for first time admins#20734

Merged
voommen-livefront merged 19 commits into
mainfrom
dirt/pm-34724/carousel-for-first-time-admins
May 26, 2026
Merged

[PM-34724] Access Intelligence Carousel for first time admins#20734
voommen-livefront merged 19 commits into
mainfrom
dirt/pm-34724/carousel-for-first-time-admins

Conversation

@voommen-livefront
Copy link
Copy Markdown
Collaborator

@voommen-livefront voommen-livefront commented May 19, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-34724

📔 Objective

  1. Added new dev-menu option to monitor user state updates and to invoke the new dialog
  2. Created a new dialog reusing Vault Carousel
  3. Invoke the dialog when there are no access intelligence reports are found and when the org has no ciphers
  4. Renamed the dialogs for better name
  • Post Import Dialog - renders when there are no reports but there are ciphers
  • New Admin Welcome dialog - renders when the org has no ciphers and no access intelligence reports

📸 Screenshots

Added new dev-menu options to invoke the welcome carousel

image

New Carousel dialog for new admins

Screenshot 2026-05-19 at 1 36 02 PM Screenshot 2026-05-19 at 1 36 07 PM Screenshot 2026-05-19 at 1 36 12 PM Screenshot 2026-05-19 at 1 36 16 PM

@voommen-livefront voommen-livefront requested review from a team as code owners May 19, 2026 18:39
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 31.61765% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.81%. Comparing base (cdbe896) to head (cafe3db).
⚠️ Report is 37 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...t/access-intelligence/shared/dev-menu.component.ts 0.00% 27 Missing ⚠️
...irt/access-intelligence/risk-insights.component.ts 0.00% 22 Missing ⚠️
...ding/new-admin-welcome-dialog.component.stories.ts 0.00% 16 Missing ⚠️
...e/onboarding/new-admin-welcome-dialog.component.ts 70.96% 9 Missing ⚠️
...ligence-page/access-intelligence-page.component.ts 50.00% 8 Missing and 1 partial ⚠️
...lligence/onboarding/services/onboarding.service.ts 61.53% 5 Missing ⚠️
...e/onboarding/post-import-modal-dialog.component.ts 50.00% 3 Missing ⚠️
.../vault/src/components/carousel/carousel.stories.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20734      +/-   ##
==========================================
+ Coverage   47.44%   47.81%   +0.36%     
==========================================
  Files        4002     4008       +6     
  Lines      123116   123411     +295     
  Branches    18938    18973      +35     
==========================================
+ Hits        58414    59005     +591     
+ Misses      60277    59958     -319     
- Partials     4425     4448      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +62 to +64
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: booleanAttribute }) hideArrows = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be updated to use an input signal? Would like to not add new //FIXME comments

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! I shouldn't introduce further technical debt. I have this fixed.

jengstrom-bw
jengstrom-bw previously approved these changes May 20, 2026
Copy link
Copy Markdown
Contributor

@jengstrom-bw jengstrom-bw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vault items look good, thanks for updating that signal!

@voommen-livefront voommen-livefront changed the title Dirt/pm 34724/carousel for first time admins [PM-34724] Access Intelligence Carousel for first time admins May 22, 2026
@Banrion Banrion added the ai-review Request a Claude code review label May 22, 2026
@Banrion
Copy link
Copy Markdown
Contributor

Banrion commented May 22, 2026

@claude Please review!

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 22, 2026

Claude finished @Banrion's task in 3m 54s —— View job


Claude Code Review

Reviewed the carousel signal migration, the new NewAdminWelcomeDialogComponent, the OnboardingService updates, the DevMenuComponent refactor, and the v1/v2 page integrations.

🔴 Bugs

1. v2 page's dev menu is wired to a removed output

bitwarden_license/bit-web/src/app/dirt/access-intelligence/v2/access-intelligence-page/access-intelligence-page.component.html:110

<dirt-dev-menu
  (beginTour)="beginOnboardingTour()"
  (importData)="goToImportPage()"
></dirt-dev-menu>

DevMenuComponent was refactored — beginTour was replaced by two new outputs (beginPostImportTour, beginNewAdminWelcomeTour). With strict template checking this binding fails to compile, and at minimum it's a no-op. The dev menu in v2 will not invoke any tour.

Also, while v1 (risk-insights.component.ts) was updated to launch NewAdminWelcomeDialogComponent from the empty/no-ciphers state, the v2 page (access-intelligence-page.component.ts) was not. Was the v2 wiring intentionally deferred? If not, the new-admin welcome flow won't fire on the v2 path at all.

Fix this →

2. Storybook mock uses the wrong service method name

bitwarden_license/bit-web/src/app/dirt/access-intelligence/onboarding/new-admin-welcome-dialog.component.stories.ts:20

const mockOnboardingService = { setCarouselAcknowledged: async () => {} };

The component calls setNewAdminWelcomeDialogAcknowledged() from both onSkip and onImportData. Pressing Skip or Import Data in the story throws setNewAdminWelcomeDialogAcknowledged is not a function.

Fix this →


🟡 Quality

3. TOTAL_SLIDES = 4 must stay manually in sync with the templatenew-admin-welcome-dialog.component.ts:31. Adding or removing a <vault-carousel-slide> requires also bumping this constant, with no compile-time check. Consider deriving slide count via the carousel's slideChange (last index emitted) or by counting via a template-ref QueryList.

4. All four slides use the same placeholder imagenew-admin-welcome-dialog.component.html lines 13, 30, 44, 58 all point at /images/access-intelligence/data-is-in.svg. If this is awaiting design, a TODO would help; otherwise the slides are visually indistinguishable.

5. Injected DIALOG_DATA is unused in PostImportModalDialogComponentpost-import-modal-dialog.component.ts:37 injects data and WelcomeModalDialogData but nothing in the component reads it. Either remove the injection (and the organizationId argument from showDialog) or use it.

6. Silent error swallowing in PostImportModalDialogComponent.onSkippost-import-modal-dialog.component.ts:43-50 uses .catch(() => {}), so a failure to set acknowledged state is invisible. Even logging via LogService (as the dev menu does) would be enough. The new admin dialog's onSkip doesn't catch at all — pick one convention.

7. Test coverage regression for post-import dialog — The deleted welcome-modal-dialog.component.spec.ts covered onStartTour; the new post-import-modal-dialog.component.spec.ts only tests onSkip and creation. Re-add an onStartTour test.

8. Missing alt textpost-import-modal-dialog.component.html:4 <img src=".../data-is-in.svg"> has no alt. The new-admin dialog correctly uses alt="" aria-hidden="true" — apply the same here for consistency.

9. nextSlide/prevSlide widened from protected to publiccarousel.component.ts:128,134. This expands the public API of a shared libs/vault component to satisfy a single consumer that calls them through a template ref. Acceptable, but worth confirming the carousel team is OK with the expanded surface (could alternatively be driven by parent-supplied [selectedIndex] input).

10. Minor — duplicate tw-text-center in new-admin-welcome-dialog.component.html on bitDialogContent and again on each slide's inner <div>. The outer one is sufficient.

11. Unused params argumentrisk-insights.component.ts:413 (and the v2 mirror at :439) declare params: string[] and never use it. Pre-existing, but flagging since this PR touches these files.


✅ Strengths

  • OnboardingService correctly splits the two acknowledgement keys and persists them via clearOn: [].
  • combineLatest([hasReportData$, hasCiphers$]) + take(1) in risk-insights.component.ts:282-292 correctly guarantees the welcome tour fires at most once per page mount, and the acknowledged check inside showDialog short-circuits subsequent navigations.
  • Nice signal-based refactor of currentSlide / isFirstSlide / isLastSlide in response to @jengstrom-bw's feedback.
  • hideArrows correctly implemented as input<boolean>() rather than another @Input.

Summary: two bugs (v2 dev-menu event binding mismatch + story mock method name) should block; the rest are polish. The v2 page also seems to be missing the new-admin welcome wiring entirely — please confirm whether that's intentional.
• Branch: dirt/pm-34724/carousel-for-first-time-admins

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Claude Code is reviewing this pull request...

If this comment does not update with results, check the Actions log.

@sonarqubecloud
Copy link
Copy Markdown

@voommen-livefront voommen-livefront merged commit 995ab6d into main May 26, 2026
161 of 172 checks passed
@voommen-livefront voommen-livefront deleted the dirt/pm-34724/carousel-for-first-time-admins branch May 26, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants